<include file="Public:header" />
<div class="clear"></div>
<div class="breadcrumb"> <a href="{$webConfig['host_url']}">{$webConfig['web_name']}</a><span>&gt;</span> <a href="{:U('/member/')}">会员中心</a><span>&gt;</span> 我的网站 </div>
<div class="clear"></div>
<div class="main-user">
	<include file="left" />
    <div class="main-user-right">
    	<div class="user-title">
        	我的网站&nbsp;&nbsp;&nbsp;&nbsp; <a class="active" href="{:U('webapply')}">审核列表</a> - <a href="{:U('websites')}">已上线</a>
        </div>
        <div class="clear"></div>
        <notempty name="list">
        <ul class="sitelist member-sitelist">
          <volist name="list" id="vo">
          <li class="del-{$vo['id']}"><a href="{$vo['url']}" target="_blank"><img src="http://api.webthumbnail.org?width=320&height=200&screen=1024&url=http://{$vo['domain']}" width="120" height="90" alt="{$vo['name']}" class="thumb" /></a>
            <div class="info"><a href="{$vo['url']}" target="_blank" class="title">{$vo['name']}</a>
              <div class="intro">{$vo['description']}</div>
              <div class="url"><a href="http://{$vo['domain']}/" rel="nofollow" target="_blank" class="visit" onclick="clickout({$vo['id']})">{$vo['domain']}</a> - {:dateLocalFormat($vo['add_time'])}</div>
            </div>
          </li>
          <li class="message del-{$vo['id']}">
          <if condition="$vo['status'] eq 1">
          	<span class="wait" id="status-{$vo['id']}">待审核,请耐心等待!</span>
            <a href="javascript:payquick('{$vo['id']}')" id="money-{$vo['id']}" class="money">付费快审</a>
            <a href="javascript:webapplydel('{$vo['id']}')" id="del-{$vo['id']}" class="del">删除</a>
          <elseif condition="$vo['status'] eq 3"/>
          	<span class="wait">我们已经收到您的快审请求,24小时之内即可审核您的网站!</span>
            <a href="javascript:webapplydel('{$vo['id']}')" id="del-{$vo['id']}" class="del">删除</a>
          <else/>  
            <span class="pass">被拒绝</span>
            <a href="{:U('/addurl', array('id'=>$vo['id']))}" class="resubmit">重新提交</a>
            <a href="javascript:webapplydel('{$vo['id']}')" id="del-{$vo['id']}" class="del">删除</a>
            <p>拒绝理由：{$vo['status_message']}</p>
            </if>
          </li>
          </volist>
        </ul>
        
        
  	    <div class="clearfix showpage"><span class="total_page">共{$page['count']}个网站 当前{$page['nowPage']}/{$page['countPage']}页</span> <gt name="page['prev']" value="1"><a href="{:U($pageUrl, array('p'=>$page['prev']))}" class="prev_page">上一页</a></gt> <foreach name="page['forPage']" item="vo">
            <if condition="($page['nowPage'] == $vo)"> <span class="current">{$vo}</span>
              <else/>
              <a href="{:U($pageUrl, array('p'=>$vo))}" class="pages">{$vo}</a> </if>
          </foreach> <gt name="page['prev']" value="1"><a href="{:U($pageUrl, array('p'=>$page['next']))}" class="next_page">下一页</a></gt>  </div>
          <else/>
          还没有待处理的网站，如果您有新的网站：<a href="{:U('/addurl/')}" style="color:red;">点此提交</a>
          </notempty>
        <div class="clear"></div>
    </div>
</div>
<div class="clear"></div>

<div id="payquick-box">
    <ul class="payquick-ul">
    	<li>1. 付费审核，为了内容的合法性，并不能直接生效，只会加快管理员的审核速度！</li>
        <li>2. 付费审核的网站，如果内容合法，一般会在24小时内收录</li>
        <li>3. 付费审核的网站，如果内容不合法，管理员会拒绝你提交的网站，拒绝之后您的花费并不会返回给你，请谨慎对待你提交网站的合法性。</li>
        <li> <center><a href="javascript:;" id="btn-payquick" class="btn">确定条款，使用付费快审!</a></center> </li>
    </ul>	
</div>


<script type="text/javascript">
function webapplydel(id){
	//{:U('webapplydel', array('id'=>$vo['id']))}
	$("#del-"+id).html("正在删除!");
	$.ajax({
	   type: "POST",
	   url: "{:U('webapplydel')}",
	   data: "id="+id,
	   success: function(result){
			if(result['status'] == 1){
				$(".del-"+id).closest("li").fadeOut(500, function(){
					$("#del-"+id).remove();
				});
			}else{
				$("#del-"+id).html(result['info']);	
			}
	   }
	});	
}

function payquick(id){
	$("#btn-payquick").data("id", id);
	hiBox('#payquick-box', '重要申明','400','','','.a_close');
}
$(function(){
	var nowClick = 1;
	$("#btn-payquick").live("click", function(){
		$(this).html("正在提交，请不要重复点击!");
		if(nowClick == 1){
			nowClick++;
			var id = $("#btn-payquick").data("id");
			if(parseInt(id) > 0){
				$.ajax({
				   type: "POST",
				   url: "{:U('payquick')}",
				   data: "id="+id,
				   success: function(result){
						if(result['status'] == 1){
							$("#status-"+id).html(result['info']);
							$("#money-"+id).remove();
							$("#popup_overlay").remove();
							$("#popup_container").remove();
						}else{
							alert(result['info']);	
						}
						nowClick = 1;
				   }
				});	
			}else{
				alert("没有获取到ID，请刷新网页后重试!");
			}
		}	
	});
});
</script>
<include file="Public:footer" />